-#
  Copyright 2008 Garth Williams

  This file is part of CommandPost.

  CommandPost is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  CommandPost is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with CommandPost.  If not, see <http://www.gnu.org/licenses/>.


%h1 Reports

- if @reports.length == 0
  %tr
    %td{:colspan => '4'} No reports found
- else
  %table
    %tr
      %th Type
      %th Title
      %th Created on
      %th Created by
    - for report in @reports
      %tr
        %td= h report.report_type.name
        %td= link_to h(report.title), edit_report_path(report)
        %td= render_date report.created_on
        %td= h report.created_by_user.name
        -# <td><%= link_to 'Show', report %></td>
          <td><%= link_to 'Edit', edit_report_path(report) %></td>
          <td><%= link_to 'Destroy', report, :confirm => 'Are you sure?', :method => :delete %></td>

%br

= link_to 'New report', new_report_path
